const nodata = require('../tw-lib-base/no-data/props')
const commonProps = require('../tw-lib-base/chart/common-props')
// const axisProps = require('../tw-lib-base/chart/axis-props')
// const datazoomProps = require('../tw-lib-base/chart/datazoom-props')
const tooltipProps = require('../tw-lib-base/chart/tooltip-props')

module.exports = {
  ...commonProps,

  // ...axisProps,
  // ...datazoomProps,
  ...tooltipProps,

  data: {
    type: Array,
    default () {
      return [
        {
          "name": "市级课题",
          "value": 32
        },
        {
          "name": "省级课题",
          "value": 15
        },
        {
          "name": "国家课题",
          "value": 5
        }
      ]
    },
    name: '图表数据集',
    filedType: 'api'
  },
  height: {
    type: String,
    default: '300px',
    name: '图表容器高度',
    filedType: 'string'
  },
  labelunit: {
    type: String,
    default: '',
    name: '单位',
    filedType: 'string'
  },

  barWidth: {
    type: String,
    default: '36',
    name: '柱子宽度',
    filedType: 'string'
  },

  labelColor: {
    type: String,
    default: '#beceff',
    name: '底部文字颜色',
    filedType: 'color'
  },
  axisFontSize: {
    type: String,
    default: '16',
    name: '底部文字字体',
    filedType: 'string'
  },
  labelFontSize: {
    type: String,
    default: '16',
    name: '标签文字字体',
    filedType: 'string'
  },

  quancolors: {
    type: Array,
    default () {
      return [
        '#4ac7ff',
        '#96e388',
        '#4ac7ff',
        '#2bd3bd',
        '#96e388',
        '#fecd63'
      ]
    },
    name: '渐变色顶部',
    nameTip: '图表按此处指定的值循环取色',
    filedType: 'list',
    subType: 'color',
    subDefault: '#2bd3bd',
    max: 16
  },

  ...nodata
}
